package org.qydjk.common.pojo;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

@Entity
@Table(name = "qy_store_card_category", schema = "qydjk", catalog = "")
public class StoreCardCategory {
    private Integer id;
    private String name;
    private String img;
    private String thumbnailImg;
    private Integer totalRepertory;
    private Integer remainRepertory;
    private Integer sell;
    private Integer actived;
    private BigDecimal faceVal;
    private String suitSellerIds;
    private Date createTime;
    private Date updateTime;
    private Integer status;
    private Integer productId;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "img")
    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    @Basic
    @Column(name = "thumbnail_img")
    public String getThumbnailImg() {
        return thumbnailImg;
    }

    public void setThumbnailImg(String thumbnailImg) {
        this.thumbnailImg = thumbnailImg;
    }

    @Basic
    @Column(name = "total_repertory")
    public Integer getTotalRepertory() {
        return totalRepertory;
    }

    public void setTotalRepertory(Integer totalRepertory) {
        this.totalRepertory = totalRepertory;
    }

    @Basic
    @Column(name = "remain_repertory")
    public Integer getRemainRepertory() {
        return remainRepertory;
    }

    public void setRemainRepertory(Integer remainRepertory) {
        this.remainRepertory = remainRepertory;
    }

    @Basic
    @Column(name = "sell")
    public Integer getSell() {
        return sell;
    }

    public void setSell(Integer sell) {
        this.sell = sell;
    }

    @Basic
    @Column(name = "actived")
    public Integer getActived() {
        return actived;
    }

    public void setActived(Integer actived) {
        this.actived = actived;
    }

    @Basic
    @Column(name = "face_val")
    public BigDecimal getFaceVal() {
        return faceVal;
    }

    public void setFaceVal(BigDecimal faceVal) {
        this.faceVal = faceVal;
    }

    @Basic
    @Column(name = "suit_seller_ids")
    public String getSuitSellerIds() {
        return suitSellerIds;
    }

    public void setSuitSellerIds(String suitSellerIds) {
        this.suitSellerIds = suitSellerIds;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "update_time")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Basic
    @Column(name = "product_id")
    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        StoreCardCategory that = (StoreCardCategory) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (img != null ? !img.equals(that.img) : that.img != null) return false;
        if (thumbnailImg != null ? !thumbnailImg.equals(that.thumbnailImg) : that.thumbnailImg != null) return false;
        if (totalRepertory != null ? !totalRepertory.equals(that.totalRepertory) : that.totalRepertory != null)
            return false;
        if (remainRepertory != null ? !remainRepertory.equals(that.remainRepertory) : that.remainRepertory != null)
            return false;
        if (sell != null ? !sell.equals(that.sell) : that.sell != null) return false;
        if (actived != null ? !actived.equals(that.actived) : that.actived != null) return false;
        if (faceVal != null ? !faceVal.equals(that.faceVal) : that.faceVal != null) return false;
        if (suitSellerIds != null ? !suitSellerIds.equals(that.suitSellerIds) : that.suitSellerIds != null)
            return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        if (productId != null ? !productId.equals(that.productId) : that.productId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (img != null ? img.hashCode() : 0);
        result = 31 * result + (thumbnailImg != null ? thumbnailImg.hashCode() : 0);
        result = 31 * result + (totalRepertory != null ? totalRepertory.hashCode() : 0);
        result = 31 * result + (remainRepertory != null ? remainRepertory.hashCode() : 0);
        result = 31 * result + (sell != null ? sell.hashCode() : 0);
        result = 31 * result + (actived != null ? actived.hashCode() : 0);
        result = 31 * result + (faceVal != null ? faceVal.hashCode() : 0);
        result = 31 * result + (suitSellerIds != null ? suitSellerIds.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (productId != null ? productId.hashCode() : 0);
        return result;
    }
}
